IMAGE_NAME = sacs/cat1_update
IMAGE_VERSION = 1.0.0_dev4
IMAGE_REPOSITORY = registry.cn-shenzhen.aliyuncs.com

build:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o cat1_update  main.go

image:
	make build
	docker build -t ${IMAGE_NAME}:${IMAGE_VERSION} .
	docker tag ${IMAGE_NAME}:${IMAGE_VERSION}  ${IMAGE_REPOSITORY}/${IMAGE_NAME}:${IMAGE_VERSION}

push:
	docker push ${IMAGE_REPOSITORY}/${IMAGE_NAME}:${IMAGE_VERSION}

clean:
	docker rmi -f $$(docker images | grep ${IMAGE_NAME} | awk '{print $$3}') || true


SERVER_IP = 120.78.130.252
PASSWORD = Cfktest123
ssh:
	ssh  -o ServerAliveInterval=30 root@${SERVER_IP}

Scp:
	scp -r cat1_setup/*  root@${SERVER_IP}:/root/cat1

remoteScp:
	scp -r root@${SERVER_IP}:/root/cat1